package com.stylefeng.guns.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * lg_机器人
 * </p>
 *
 * @author stylefeng123
 * @since 2018-01-31
 */
@TableName("lg_robot")
public class Robot extends Model<Robot> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 昵称
     */
    @Length(min = 1, max = 100, message = "昵称字数必须在1到100之间")
    @NotBlank(message="昵称不能为空")
    private String nickname;
    /**
     * 头像
     */
    private String headimgurl;
    /**
     * 正确率
     */
    @Range(min = 0, max = 100, message = "胜率必须在0到100之间")
    @NotNull(message="胜率不能为空")
    private Integer rate;
    /**
     * 段位
     */
    @NotNull(message="段位不能为空")
    private Integer divisionid;
    /**
     * 等级
     */
    @NotNull(message="等级不能为空")
    private Integer level;
    /**
     * 性别
     */
    private Integer gender;
    /**
     * 省份
     */
    private String province;
    /**
     * 城市
     */
    private String city;
    /**
     * 国家
     */
    private String country;
    /**
     * 总场次
     */
    private Integer total;
    /**
     * 胜场
     */
    private Integer win;
    /**
     * 最小答题时长
     */
    @Range(min = 0, max = 2147483647, message = "最小答题时长必须在0到2147483647之间")
    @NotNull(message="最小答题时长不能为空")
    private Integer mintime;
    /**
     * 最大答题时长
     */
    @Range(min = 0, max = 2147483647, message = "最大答题时长必须在0到2147483647之间")
    @NotNull(message="最大答题时长不能为空")
    private Integer maxtime;
    /**
     * 备注
     */
    @Length(max = 1000, message = "备注字数不得大于1000")
    private String remark;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getHeadimgurl() {
        return headimgurl;
    }

    public void setHeadimgurl(String headimgurl) {
        this.headimgurl = headimgurl;
    }

    public Integer getRate() {
        return rate;
    }

    public void setRate(Integer rate) {
        this.rate = rate;
    }

    public Integer getDivisionid() {
        return divisionid;
    }

    public void setDivisionid(Integer divisionid) {
        this.divisionid = divisionid;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getWin() {
        return win;
    }

    public void setWin(Integer win) {
        this.win = win;
    }

    public Integer getMintime() {
        return mintime;
    }

    public void setMintime(Integer mintime) {
        this.mintime = mintime;
    }

    public Integer getMaxtime() {
        return maxtime;
    }

    public void setMaxtime(Integer maxtime) {
        this.maxtime = maxtime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Robot{" +
        "id=" + id +
        ", nickname=" + nickname +
        ", headimgurl=" + headimgurl +
        ", rate=" + rate +
        ", divisionid=" + divisionid +
        ", level=" + level +
        ", gender=" + gender +
        ", province=" + province +
        ", city=" + city +
        ", country=" + country +
        ", total=" + total +
        ", win=" + win +
        ", mintime=" + mintime +
        ", maxtime=" + maxtime +
        ", remark=" + remark +
        "}";
    }
}
